#pragma once
#include "Includes.h"
#include "Constants.h"
#include "CUserCmd.h"
#include "Utilities.h"
#include "Entity.h"
#include "Player_Info.h"
#include "GameUtilities.h"
#include "HL2Interface.h"
#include "NoSpread.h"
#include "Trace.h"
#include "Ray.h"
#include "checksum_md5.h"

class SeedTrigger
{
public:
	DWORD CmdNums[2][255];
	bool Active;
	bool Shoot;
	int DesiredSeed;
	int DesiredCmdNum;
private:
	bool DoTrigger(CUserCmd* cmd);
	void GetSpreadFix( UINT Seed, SD_Tools::Angle &vIn, SD_Tools::Angle* vOut );
	static float RandomFloat(float min, float max);
	static void RandomSeed(UINT seed);
	void GetSpreadXY(UINT seed, SD_Tools::Vector & qAngle);
public:
	void Init();
	void Enable();
	void Disable();
	void Set(bool Active);
	void Compute(CUserCmd* cmd);
	void Action(CUserCmd* cmd);
};

extern SeedTrigger g_pSeedTrigger;